package com.openvas.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.openvas.commons.common.annotation.Excel;
import com.openvas.commons.common.core.domain.BaseEntity;

/**
 * 定时对象 table_schedule
 * 
 * @author ruoyi
 * @date 2021-11-04
 */
public class TableSchedule extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 定时表id */
    private String scheduleId;

    /** 定时的名称 */
    @Excel(name = "定时的名称")
    private String name;

    /** 备注 */
    @Excel(name = "备注")
    private String comment;

    /** 选择时区 */
    @Excel(name = "选择时区")
    private String timezone;

    /** 首次执行时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "首次执行时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date firstRun;

    /** 执行截止时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "执行截止时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date runUntil;

    /** 持续时间 */
    @Excel(name = "持续时间")
    private String duration;

    /** 怎么执行，是每天，还是一次 */
    @Excel(name = "怎么执行，是每天，还是一次")
    private String recurrence;

    /** 所属用户名称(不会重复) */
    @Excel(name = "所属用户名称(不会重复)")
    private String userName;

    public void setScheduleId(String scheduleId) 
    {
        this.scheduleId = scheduleId;
    }

    public String getScheduleId() 
    {
        return scheduleId;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setComment(String comment) 
    {
        this.comment = comment;
    }

    public String getComment() 
    {
        return comment;
    }
    public void setTimezone(String timezone) 
    {
        this.timezone = timezone;
    }

    public String getTimezone() 
    {
        return timezone;
    }
    public void setFirstRun(Date firstRun) 
    {
        this.firstRun = firstRun;
    }

    public Date getFirstRun() 
    {
        return firstRun;
    }
    public void setRunUntil(Date runUntil) 
    {
        this.runUntil = runUntil;
    }

    public Date getRunUntil() 
    {
        return runUntil;
    }
    public void setDuration(String duration) 
    {
        this.duration = duration;
    }

    public String getDuration() 
    {
        return duration;
    }
    public void setRecurrence(String recurrence) 
    {
        this.recurrence = recurrence;
    }

    public String getRecurrence() 
    {
        return recurrence;
    }
    public void setUserName(String userName) 
    {
        this.userName = userName;
    }

    public String getUserName() 
    {
        return userName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("scheduleId", getScheduleId())
            .append("name", getName())
            .append("comment", getComment())
            .append("timezone", getTimezone())
            .append("firstRun", getFirstRun())
            .append("runUntil", getRunUntil())
            .append("duration", getDuration())
            .append("recurrence", getRecurrence())
            .append("userName", getUserName())
            .toString();
    }
}
